
#pragma once

#include "../framework_dev/Mat4.h"


TEST(mat4, operatorMult)
{
	mat4 id;
	id[0]  = 538;	id[1]  = 612;	id[2]  = 686;	id[3]  = 760;
	id[4]  = 650;	id[5]  = 740;	id[6]  = 830;	id[7]  = 920;
	id[8]  = 762;	id[9]  = 868;	id[10] = 974;	id[11] = 1080;
	id[12] = 874;	id[13] = 996;	id[14] = 1118;	id[15] = 1240;

	mat4 left;
	for (int i = 1; i < 17; i++)
		left[i-1] = i;

	mat4 right;
	for (int i = 17; i < 33; i++)
		right[i-17] = i;

	mat4 res = left * right;

	for (int i = 0; i < 16; i++)
		ASSERT_EQ(id[i], res[i]);

	left *= right;

	for (int i = 0; i < 16; i++)
		ASSERT_EQ(id[i], left[i]);
};



/*

    static mat4 getOrtho(float left, float right, float bottom, float top, float nearZ, float farZ);
	static mat4 getPerspective(float fovyRadians, float aspect, float nearZ, float farZ);
	static mat4 getLookAt(float eyeX, float eyeY, float eyeZ,
						  float centerX, float centerY, float centerZ,
						  float upX, float upY, float upZ);
	static mat4 getIdentity();
	static mat4 getRotated(float radians, float x, float y, float z);
	static mat4 getRotatedX(float radians);
	static mat4 getRotatedY(float radians);
	static mat4 getRotatedZ(float radians);
    
	void translateX(const float dx);
	void translateY(const float dy);
	void translateZ(const float dz);
	void translate(const float dx, const float dy, const float dz);
	void rotate(float radians, float x, float y, float z);
	void rotateX(float radians);
	void rotateY(float radians);
	void rotateZ(float radians);
    void scale(float dxSc, float dySc, float dzSc);

    float&		 operator [] (const unsigned int index);
	const float& operator [] (const unsigned int index) const;
	mat4&		 operator =  (const mat4& mat);
    mat4&		 operator -  ();
    
    friend bool		   operator == (const mat4& left, const mat4& right);
    friend mat4&	   operator += (mat4& left, const mat4& right);
    friend mat4&	   operator -= (mat4& left, const mat4& right);
	friend mat4&	   operator *= (mat4& left, const float right);
	friend mat4&	   operator *= (mat4& left, const mat4& right);
    friend const mat4  operator +  (const mat4& left, const mat4& right);
    friend const mat4  operator -  (const mat4& left, const mat4& right);
    friend const mat4  operator *  (const mat4& left, const float right);
    friend const mat4  operator *  (const mat4& left, const mat4& right);
	friend const vec4  operator *  (const mat4& left, const vec4& right);

*/